<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    body {
      background: #000;
    }
    div {
      width: 479px;
      height: 300px;
      margin: 100px auto;
      background: url(./1.png) no-repeat 0 0;
      animation: fire .5s steps(6, end) infinite alternate;
    }

    @keyframes fire {
      100% {
        background-position: -2874px 0;
      }
    }

    /* 
      0 - 2874   6
      0
      479
      958
      1437
      1916
      2395
      2874

      start
      479
      958
      1437
      1916
      2395
      2874
      end 
      0
      479
      958
      1437
      1916
      2395
     */
  </style>
</head>
<body>
  <div></div>
</body>
</html>